package com.hudson.plugin;

import javax.persistence.*;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * BuildRelations entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "build_relations", catalog = "reportdb")
public class BuildRelations implements java.io.Serializable {

    // Fields

    private Integer id;
    private Integer parentId;
    private Integer childId;

    // Constructors

    /**
     * default constructor
     */
    public BuildRelations() {
    }

    /**
     * full constructor
     */
    public BuildRelations(Integer parentId, Integer childId) {
        this.parentId = parentId;
        this.childId = childId;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "parent_id")
    public Integer getParentId() {
        return this.parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    @Column(name = "child_id")
    public Integer getChildId() {
        return this.childId;
    }

    public void setChildId(Integer childId) {
        this.childId = childId;
    }

}